package lee.vioson.remotedata.repositories

import kotlinx.coroutines.flow.Flow
import lee.vioson.remotedata.bean.BannerData
import lee.vioson.remotedata.bean.Book
import lee.vioson.remotedata.bean.HomeData

/**
 *Author:viosonlee
 *Date:2023/6/3
 *DESCRIPTION:
 */
interface HomeRepository {

    val bannerData: Flow<List<BannerData>>

    fun fetchHomeData(uniqueId: String): Flow<HomeData>

    fun fetchCacheHomeData(): Flow<HomeData?>

    fun fetchMyFavorites(pageIndex: Int): Flow<List<Book>>

    fun fetchRecentlyBooks(): Flow<List<Book>>

    fun addBooksHistory(book: Book): Flow<Boolean>

    suspend fun recommendBookList(uniqueId: String,pageIndex: Int):List<Book>
    suspend fun myFavorites(pageIndex: Int): List<Book>
    suspend fun mostFavorites(pageIndex: Int): List<Book>
}